package com.easyj.admin.db.mapper;

import com.easyj.admin.db.model.User;
import com.easyj.admin.db.model.UserQO;

import java.util.Date;
import java.util.List;

public interface UserMapper {
	
	List<User> searchUser(String filter);
	
    long countByExample(UserQO example);

    int deleteByPrimaryKey(Long id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserQO example);

    User selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User selectByLoginName(String loginName);

    User selectUniqueByUqName(String name);
    
    User selectUniqueByMobile(String mobile);
    
    /**
     * 更新个人信息
     * @param persioninfo
     * @return
     */
    int updatePersonInfo(User persioninfo);
    
    
    int updateAvatar(User persioninfo);
    
    int updateLoginInfo(User logininfo);
    
    int updatePassword(User pswinfo);
    
    /**
            *       自动解锁
     * @param loginTime
     * @return
     */
    int unLockedUserAuto(Date loginTime);
    
    int  unLockedUserById(Long id);
    
    int  lockedUserById(Long id);
    
}